<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>圆</title>
    <script>
        window.onload =function(){
            alert("确定要登入此网页吗");
            document.getElementsByTagName("input")[3].onclick =function(){
                var radius =document.getElementsByTagName("input")[0].value;
                document.getElementsByTagName("input")[1].value =2*Math.PI*radius;
                document.getElementsByTagName("input")[2].value =0.5*Math.PI*radius*radius;
                
            }
            document.getElementsByTagName("input")[4].onclick =function(){
                document.getElementsByTagName("input")[0].value="";
                document.getElementsByTagName("input")[1].value="";
                document.getElementsByTagName("input")[2].value="";


            }
            
               
        }

    </script>
</head>
<body>
    <input type="text" value="半径" placeholder="请输入半径"><br>
    <input type="text" value="周长" placeholder="周长"><br>
    <input type="text" value="面积" placeholder="面积"><br>
    <input type="button" value="确定"><br>
    <input type="button" value="重置">
</body>
</html>